import request from "@/utils/request";

export interface RecordsType{
    id?:number,
    tmName:string,
    logoUrl:string
}
export type TrademarkListType = RecordsType[]

export interface TrademarkType{
    records:TrademarkListType,
    total:number,
    size:number,
    current:number,
    searchCount:boolean,
    pages:number
}

export const reqTrademarkList = (page:number,limit:number)=>{
    return request.get<null,TrademarkType>(`/admin/product/baseTrademark/${page}/${limit}`)
}

export const reqUpdateTrademark = (trademarkParam:RecordsType)=>{
    return request.put<null,null>(`/admin/product/baseTrademark/update`,trademarkParam)
}
export const reqAddTrademark = (trademarkParam:RecordsType)=>{
    return request.post<null,null>(`/admin/product/baseTrademark/save`,trademarkParam)
}

export const reqDeleteTrademark = (id:number)=>{
    return request.delete<null,null>(`/admin/product/baseTrademark/remove/${id}`)
}

